package com.news.cloud.web.model;

import com.news.cloud.jpa.domain.NameDescPersistable;

/**
 * Created by hiephn on 2014/07/23.
 */
public class NameDescResponse<E extends NameDescPersistable>
        extends IDResponse<E> {
    private String name;
    private String desc;

    public NameDescResponse() {
    }

    public NameDescResponse(int id, String name, String desc) {
        super(id);
        this.name = name;
        this.desc = desc;
    }

    public NameDescResponse(E entity) {
        super(entity);
        this.name = entity.getName();
        this.desc = entity.getDesc();
    }

    @Override
    public void setData(E entity) {
        super.setData(entity);
        this.name = entity.getName();
        this.desc = entity.getDesc();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
